
dispmsg macro message      ;显示字符串的宏，入参为字符串标号
    push ax
    push ds
    push si
    mov ax,strings
    mov ds,ax

    lea dx, message
    mov ah, 9

    int 21h

    pop si
    pop ax
    mov ds,ax
    pop ax
endm

;================================================================

strings segment

    Enter_string db 'Welcome to use Student Information Management System',0dh,0ah
        db 'Enter 1 to input information',0dh,0ah
        db 'Enter 2 to query information',0dh,0ah
        db 'Enter 3 to sort existing information',0dh,0ah
        db 'Enter 4 to display information',0dh,0ah
        db 'Enter 5 to display statistics',0dh,0ah
        db 'Enter 6 to export existing information',0dh,0ah
        db 'Enter 7 to import information',0dh,0ah
        db 'Enter 8 to exit',0dh,0ah,'$'


    Character_error db 'input character is unavailable, please re-enter ','$'
    Length_error db 'input character is out of range, please re-enter ','$'
    parameter_error db 'unexpect parameter, please re-enter ','$'

    inpyt_range_ db "Please enter a number between 1 ~ 8",0dh,0ah,"> ","$"

    str_to_value_parameter_error db 'input string has unavailable character ','$'
    str_to_value_mul_overflow_error db 'input string is overflow when turning to int ','$'

    Enter_name   db "Enter student's name: ",'$'
    Enter_ID db "Enter student's ID: ",'$'
    ID_range_error db 'input string has out of range, please re-enter ','$'
    score_range_error db 'input parameter is out of range(0 ~ 100), please re-enter ','$'

    Enter_score_ db " Enter student's score: ",'$'
    Enter_score_error db "Enter student's score is unavailable, please re-enter ", '$'
    Enter_course_design_score_ db "Enter student's course design score: ",'$'
    Enter_course_design_error db "Enter student's course design score is unavailable, please re-enter ",'$'


    Talbe_titles db  "=================================================================================================================================="
                db   0dh,0ah
                 db   "  <name>           <ID>         s1  s2  s3  s4  s5  s6  s7  s8  s9  s10 s11 s12 s13 s14 s15 s16    <design score>   <finial score>",'$'
    Top_Unknow_input_error_ db "Unknow_input,please re-enter",'$'

    Display_all_information_input_page db "Enter the target number of pages(start from 0): ",'$'
    Display_all_information_page_left db "============================================================<page ",'$'
    Display_all_information_page_right db ">=============================================================",'$'
    


    Query_information_introduce db "Enter 1 to query by name,Enter 2 to query by ID",'$'
    Query_Finish_ db "============================================================Query Finish==========================================================",'$'
    Query_information_error_ db "Enter string is unavailable,Please re-enter","$"
    Query_information_Top_Found_ db "Found: ","$"
    Query_by_name_ db "Enter target name: ","$"
    Query_by_ID_ db "Enter target ID: ","$"

    Statistics_total_student  db "Number of Students: ","$"
    Statistics_average_score  db 0dh,0ah,"Average Score: ","$"
    Statistics_Max_score db 0dh,0ah,"Max Score: ","$"
    Statistics_Min_score db 0dh,0ah,"Min Score: ","$"

    Statistics_90to100 db 0dh,0ah,"90 ~ 100: ","$"
    Statistics_80to89 db 0dh,0ah,"80 ~ 89: ","$"
    Statistics_60to79 db 0dh,0ah,"60 ~ 79: ","$"
    Statistics_low60 db 0dh,0ah,"lower than 60: ","$"

    Sort_information_success db "Sort success",0dh,0ah,"$"
    Sort_information_no_informations_error db "There haven't informations to sort",0dh,0ah,"$"




    input_t db "> ","$"
    next_row_input_t db 0dh,0ah,"> ","$"
    to_test db 'test ','$'
    finish db 'Finish ','$'
    next_row db 0dh,0ah,'$'
    one_space db ' ','$'
    two_space db '  ','$'
    three_space db '   ','$'
    four_space db '    ','$'
    ten_space db '          ','$'

    doucument_name db   "Data",0    ;  "Data_test",0  ;
    Export_success db "Export success",0dh,0ah,"$"
    Export_error db "Export error",0dh,0ah,"$"
    Import_success db "Import success",0dh,0ah,"$"
    Import_error db "Import error",0dh,0ah,"$"


strings ends

;================================================================
